package com.woniuxy.oop;

/**
 * description: TestInterface2 <br>
 * date: 2022/1/31 10:28 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
public class TestInterface2 {
    public static void main(String[] args) {
        Mysubclass mysubclass = new Mysubclass();
        mysubclass.testa();
        mysubclass.testb();
        mysubclass.testc();
    }
}

interface A {
    void testa();
}

interface B {
    void testb();
}

interface C extends A, B {
    void testc();
}

/**
 * 接口可以多继承：接口C继承接口A和B
 */
class Mysubclass implements C {

    @Override
    public void testc() {
        System.out.println("testc");
    }

    @Override
    public void testa() {
        System.out.println("testa");
    }

    @Override
    public void testb() {
        System.out.println("testb");
    }
}
